<?php include('./templete/public/head.php')?>
<body >

<!--分类-->
<div class="idea-fenlei1">

    <ul class="fenlei-list clearfix">

        <li class="list-item4" >
            <a href="<?php echo url('add')?>" >
                <div class="text">
                    <img src="_images/icon/idea-icon2.png"/>
                    <p>我要提建议 </p>
                </div>
            </a>
        </li>
        <li class="list-item5">
            <a href="<?php echo url('my')?>" >
                <div class="text">
                    <img src="_images/icon/idea-icon4.png"/>
                    <p>我的建议 </p>
                </div>
            </a>
        </li>
        <li class="list-item6">
            <a href="<?php echo url('rank')?>" >
                <div class="text">
                    <img src="_images/icon/idea-icon6.png"/>
                    <p>排行榜 </p>
                </div>
            </a>
        </li>
        <li class="list-item7">
            <a href="<?php echo url('approval')?>" >
                <div class="text">
                    <img src="_images/icon/idea-icon7.png"/>
                    <p>提议审核 </p>
                </div>
            </a>
        </li>
    </ul>
</div>
<hr class="bgcolor"/>
<!--最热提议-->
<div class="index-main hot-proposal">
    <div class="main-content proposal-content">
        <div class="c-title">
            <a href="<?php echo url('all')?>">
                <p>
                    <img src="_images/icon/index-icon1.png"/>
                    <span class="pfbold">所有提议</span>
                </p>
                <i class="iconfont fr icon-youjiantou"></i>
            </a>
        </div>
        <div class="c-list">
        </div>
    </div>
</div>
<script>
    $(function () {
        $.ajax({
            url:'<?php echo url('getlist')?>',
            data:{
                order:'add_time desc',
                limit:9,
                status:[4,8],
            },
            success:function (data) {
                if(data.code==0){
                    var html ='';
                    $.each(data.data,function (k,v) {
                        html+='<a href="/index/propose/detail/id/'+v.id+'" class="list-item clearfix">' +
                            '<div class="item-img fl"><img src="'+v.user_head+'" class="head-img"/></div>' +
                            '<div class="item-detail"> <div class="detail1"><p class="title pfbold one-txt-cut">'
                            +v.title+
                            '</p>';
                        if(k<5){
                            html+='<img src="_images/icon/new-icon.png" class="new-icon"/>' ;
                        }
                        html+='</div><div class="tag2"><span>'+v.question_classfy+'</span>' +
                            '<span>'+v.department+'</span></div><div class="detail3"><div class="text">'+
                            v.problem_content +
                            '</div></div><div class="detail4"><p>'+v.user_name+'：'+v.add_time+'</p>' +
                            '<p><i class="iconfont icon-dianzan"></i></p></div></div></a>'
                    })
                    $('.c-list').html(html);
                }else{
                    layer.msg('信息获取错误');
                }
            }
        })
    })
</script>
</body>
</html>